package com.sinaapp.mrblog.game.Assasin.model;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.sinaapp.mrblog.game.Assasin.stage.GameStage;
import com.sinaapp.mrblog.game.Assasin.util.AssasinManager;

public class Life  extends BaseActor{
	
	public static final float LIFE_WIDTH = 1;
	public static final float LIFE_HEIGHT = 15;
	
	public static final float MAX_LIFE_VALUE = 100;
	public static final float MIN_LIFE_VALUE = 0;
	
	public Life(float positionX, float positionY) {
		super(positionX, positionY, LIFE_WIDTH, LIFE_HEIGHT);
		
	}
	@Override
	public void act(float delta) {

		region = AssasinManager.floodRegion;		
		sprite.setColor(Color.RED);
		
		setHeight(GameStage.killer.life/MAX_LIFE_VALUE*LIFE_HEIGHT);
		super.act(delta);
	}
	@Override
	public void refreshStatus() {
		
	}
	@Override
	public TextureRegion getReadyRegion() {
		return region;
	}

}
